/*-----------------------------------------------------------------------
CONFIDENTIAL IN CONFIDENCE
This confidential and proprietary software may be only used as authorized
by a licensing agreement from zjl ().
In the event of publication, the following notice is applicable:
Copyright (C) 2013-20xx zjl Corporation
The entire notice above must be reproduced on all authorized copies.
Author				:		zjl
Technology blogs 	:
Email Address 		: 		540113104@gmail.com
Filename			:		.v
Data				:		2018-04-06
Description			:		.
Modification History	:
Data			By			Version			Change Description
=========================================================================
04/06/18		zjl			  1.0				Original
-----------------------------------------------------------------------*/

`timescale 1ns/1ns
module tb_x;

//------------------------------------------
localparam PERIOD_50MHZ = 20;			//50MHz
//信号列表
reg	 				clk;		//clock
reg 				rst_n;		//reset @high voltage
reg 				i_Pulse;		//reset @high voltage

//------------------任务------------------------

//*任务：Generate global reset
task task_reset;
begin
	rst_n = 0;
	repeat(2) @(negedge clk);
	rst_n = 1;
end
endtask

//系统时钟
initial
begin
	clk = 0;
	forever	#(PERIOD_50MHZ/2)
	clk = ~clk;
end
//----------------------------------------------
initial
begin
	task_reset;

end
initial
begin
	i_Pulse = 0;
	#500
	i_Pulse = 1;
	#500
	i_Pulse = 0;


end
//----------------------模块例化------------------------
ifdef inst_ifdef(
	.i_Clk			( clk ),
	.i_Rst_n		( rst_n ),
	.i_Pulse		( i_Pulse )
);
//----------------------------------------------

endmodule
